package com.singzi.javaSenior.stream.basic;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        Stream<String> as = new ArrayList<String>().stream();
        Stream<String> as1 = Arrays.stream("a,b,c,d,e".split(","),2,5);
        System.out.println(Arrays.toString(as1.toArray()));
        int []a = {1,1,2,3,4,4,5,6};
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(1);
        list.add(1);
        Stream<Integer> s1 = Stream.of(1,1,2,3,4,4,5,6);
        Stream<Integer> s2 = s1.distinct();
        System.out.println(Arrays.toString(s1.toArray()));


    }
}
